import request from '@/utils/request'

export function getProductList(query) {
  return request({
    url: '/mechanism/product/getList',
    method: 'post',
    data: query
  })
}

export function getProductUsableList(query) {
  return request({
    url: '/mechanism/product/getAvailable',
    method: 'post',
    data: query
  })
}

export function getProductDetail(id) {
  return request({
    url: '/mechanism/product/getDetail',
    method: 'post',
    data: id 
  })
}

export function saveProduct(id) {
  return request({
    url: '/mechanism/product/save',
    method: 'post',
    data: id
  })
}

export function removeProductByID(id) {
  return request({
    url: '/mechanism/product/delete',
    method: 'post',
    data: id
  })
}

export function changeProductStatusByID(id) {
  return request({
    url: '/mechanism/product/change-status',
    method: 'post',
    data: id
  })
}

